package com.base.self.es.model;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;

import java.math.BigDecimal;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Document(indexName = "ces",type = "ces", shards = 1, replicas = 0, refreshInterval = "-1")
public class CommodityEs {
    @ApiModelProperty(value = "ID自增长（商品编号）")
    @Id
    private Integer id;

    @ApiModelProperty(value = "商品名称")
    private String commodityName;

    @ApiModelProperty(value = "实付价")
    private BigDecimal commodityRealPrice;

    @ApiModelProperty(value = "市场价")
    private BigDecimal commodityMarketPrice;

    @ApiModelProperty(value = "销量")
    private Integer commoditySales;

    @ApiModelProperty(value = "商品分区 0: 奖励金区 1：积分")
    private Integer commoditySubarea;

    @ApiModelProperty(value = "商品分类一级id")
    private Integer commodityClassifyLevel1;

    @ApiModelProperty(value = "商品分类二级id")
    private Integer commodityClassifyLevel2;

    @ApiModelProperty(value = "商品展示图片")
    private String commodityShowPic;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;
}
